<template>
  <div class="encode">
    <w-nav-bar
      title="编码/解码"/>

    <group
      v-for="(v, k) in dataArr"
      :title="v.title"
      :key="k">
      <cell
        v-for="(item, itemk) in v.items"
        :key="itemk"
        :title="item.title"
        :link="`${item.to}?index=${itemk}&title=${item.title}&section=${k}`"
        is-link/>
    </group>
  </div>
</template>

<script>
  import {Cell, Group} from 'vux'

  export default {
    name: 'ToolEncode',
    components: {
      Cell,
      Group
    },
    data() {
      return {
        /**
         * 列表数据
         */
        dataArr: [
          {
            title: 'URL',
            items: [
              {
                title: 'URL编码',
                to: '/tool/encode-detail'
              },
              {
                title: 'URL解码',
                to: '/tool/encode-detail'
              }
            ]
          },
          {
            title: 'base64',
            items: [
              {
                title: 'base64编码',
                to: '/tool/encode-detail'
              },
              {
                title: 'base64解码',
                to: '/tool/encode-detail'
              },
              {
                title: 'hex编码',
                to: '/tool/encode-detail'
              },
              {
                title: 'hex解码',
                to: '/tool/encode-detail'
              },
              {
                title: '图片base64编码',
                to: '/tool/encode-detail'
              },
              {
                title: 'base64图片解码',
                to: '/tool/encode-detail'
              }
            ]
          },
          {
            title: 'MD5',
            items: [
              {
                title: 'MD5',
                to: '/tool/encode-detail'
              },
              {
                title: 'SHA1',
                to: '/tool/encode-detail'
              },
              {
                title: 'SHA256',
                to: '/tool/encode-detail'
              },
              {
                title: 'SHA512',
                to: '/tool/encode-detail'
              }
            ]
          },
          {
            title: 'Hmac',
            items: [
              {
                title: 'Hmac(MD5)',
                to: '/tool/encode-detail'
              },
              {
                title: 'Hmac(SHA1)',
                to: '/tool/encode-detail'
              },
              {
                title: 'Hmac(SHA256)',
                to: '/tool/encode-detail'
              },
              {
                title: 'Hmac(SHA512)',
                to: '/tool/encode-detail'
              }
            ]
          },
          {
            title: 'Hmac',
            items: [
              {
                title: 'AES加密',
                to: '/tool/encode-detail'
              },
              {
                title: 'AES解密',
                to: '/tool/encode-detail'
              }
            ]
          }
        ]
      }
    }
  }
</script>

<style lang="scss" scoped>

</style>
